﻿using CodeMan.Domain.Shared;
using CodeMan.Entitys;
using Microsoft.Extensions.Localization;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Entities.Auditing;

namespace CodeMan.Domain.ClassGens
{
    /// <summary>
    /// 类属性
    /// </summary>

    public class ClassAttribute : Entity, IEntityBlazor
    {

        public Int64 ClassGenId { get; set; }
        /// <summary>
        /// 字段名称
        /// </summary> 
        public string AName { get; set; }

        /// <summary>
        /// 序号
        /// </summary> 
        public int SortNo { get; set; }

        /// <summary>
        /// 类型
        /// </summary> 
        public AttrTypeEnum AType { get; set; }
        /// <summary>
        /// 长度
        /// </summary> 
        public int Length { get; set; }
        /// <summary>
        /// 默认值 
        /// </summary> 
        public string defaultValue { get; set; }

        /// <summary>
        /// 字段说明
        /// </summary> 
        public string ADesc { get; set; }
        public bool IsShow { get; set; }
        public string IsKey { get; set; }
        public bool IsAutoGenerate { get; set; }

        //public ClassGen OneClassDTO { get; set; }


        public override object[] GetKeys()
        {
            return new object[] { ClassGenId, AName };
        }
    }


}
